﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.BUS;
using Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.DAL;
using Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.VO;
using System.Data;

namespace Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.BUS
{
    class UserBusNhanVien
    {
        private NhanVien NV;

        public UserBusNhanVien()
        {
            NV = new NhanVien();
        }

        public bool Insert(UserVONhanVien obj)
        {
            return NV.Insert(obj.HOTEN, obj.NGAYSINH, obj.DIENTHOAI, obj.DIACHI, obj.GIOITINH, obj.TENDANGNHAP,obj.PASSWORD,obj.QUYENDANGNHAP);
        }

        public bool Update(UserVONhanVien obj)
        {
            return NV.Update(obj.MANHANVIEN, obj.HOTEN, obj.NGAYSINH, obj.DIENTHOAI, obj.DIACHI, obj.GIOITINH, obj.TENDANGNHAP, obj.PASSWORD,obj.QUYENDANGNHAP);
        }

        public bool Delete(UserVONhanVien obj)
        {
            return NV.Delete(obj.MANHANVIEN);
        }

        public DataTable SelectAllTable()
        {
            return NV.SelectAll();
        }

        public DataTable SelectID(int MaNV)
        {
            return NV.SelectID(MaNV);
        }
    }
}
